package com.atguigu.ssyx.activity.service;


import com.atguigu.ssyx.model.activity.CouponInfo;
import com.atguigu.ssyx.model.order.CartInfo;
import com.atguigu.ssyx.vo.activity.CouponRuleVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 优惠券信息 服务类
 * </p>
 *
 * @author author
 * @since 2025-09-16
 */
public interface ICouponInfoService extends IService<CouponInfo> {

    Map<String, Object> findCouponByIdRuleList(Long id);


    void saveCouponRule(CouponRuleVo couponRuleVo);

    List<CouponInfo> findCouponInfo(Long skuId, Long userId);

    List<CouponInfo> findCartCouponInfo(List<CartInfo> cartInfoList, Long userId);

    void updateCouponInfoUseStatus(Long couponId, Long userId, Long orderId);

    /**
     * 获取优惠券范围对应的购物车列表
     * @param cartInfoList
     * @param couponId
     * @return
     */
    CouponInfo findRangeSkuIdList(List<CartInfo> cartInfoList, Long couponId);

}
